package com.thermal.thermal_inspection.feign;

import com.thermal.thermal_inspection.annotation.InternalApi;
import com.thermal.thermal_inspection.common.CommonResponse;
import com.thermal.thermal_inspection.vo.NonInspectionVO;
import com.thermal.thermal_inspection.vo.StatusNumVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "inspection-service" , url = "http://localhost:8070/api" )
public interface InspectionFeignService {
    /**
     * 查找用户巡查，异常，漏检，不合格数
     */
    @GetMapping("/inspection/statusNum")
    @InternalApi  // 只有内部服务可调用
    public String getStatusNum(@RequestParam int userId);
    /**
     * 本周，本季，本月，本年未巡检数
     */
    @GetMapping("/inspection/nonInspection")
    @InternalApi  // 只有内部服务可调用
    public CommonResponse<NonInspectionVO> getNonInspection(@RequestParam int userId);
}
